package com.common.exception;

import com.common.consts.CommonRespCode;

/**
 * @author: zhaojd1604@gmail.com
 * @date: 2019-01-03 9:29
 * @description: 鉴权异常类
 * @since: V0.0.1
 */
public class AuthException extends CommonException {

    private static final long serialVersionUID = -1335776708477063830L;

    private CommonRespCode commonRespCode;

    public AuthException( CommonRespCode commonRespCode) {
        this.commonRespCode = commonRespCode;
    }

    public AuthException(String msgTemplete, Object[] objs) {
        super(msgTemplete, objs);
    }

    @Override
    public int getResponseCode() {
        return this.commonRespCode.getCode();
    }
}